Skip to content

+ add R/W Apple II Binary II archives - #124

Merged
Hawkynt merged 1 commit into
mainfrom
feat/apple2-binaryii-archive
Aug 30, 2026
Merged

+ add R/W Apple II Binary II archives#124
Hawkynt merged 1 commit into
mainfrom
feat/apple2-binaryii-archive

Conversation

@Hawkynt

@Hawkynt Hawkynt commented Aug 29, 2026

Copy link
Copy Markdown
Owner

What changed

Adds Apple II Binary II / BLU (.bny / .bqy) as a first-class archive format.

  • version-1 128-byte record headers (0A 47 4C, secondary 02 marker)
  • ProDOS-style partial path handling with deterministic normalization
  • explicit directory records before descendants
  • stored member creation
  • Squeeze member creation via the existing managed FileFormat.Squeeze building block
  • auto mode chooses Squeeze only when the 128-byte-rounded stored extent is smaller
  • historical BLU .QQ Squeeze fallback when the compressed data flag is absent
  • encrypted and undefined sparse records are listed but extraction refuses rather than guessing
  • phantom records participate in physical layout/countdown but are not exposed as ordinary files

Genuine R/W

CanModify is intentional. Binary II members are independently framed as 128-byte header + payload rounded to 128 bytes, so modification does not require extract/re-create:

  • add appends new physical records and repairs files-to-follow countdown bytes
  • replace rewrites the target record and shifts only the following tail when its rounded extent changes
  • remove shifts only the following tail left and truncates
  • directory removal also removes descendants
  • untouched stored/compressed member payloads are never decoded or re-encoded

The reader treats files-to-follow as metadata rather than the only parse delimiter so stale counters can be repaired safely during direct mutation.

Layout / cleanup

Implements IArchiveLayoutMap for per-record headers, payloads, and 128-byte padding. Defragmentation zeros member padding and trims trailing transport garbage without rewriting payloads.

Tests

Coverage includes stored and Squeeze round trips, BLU .QQ compatibility, directory synthesis, direct add/replace/remove, countdown repair, auto compression, ProDOS path normalization, encryption rejection, and trailing-padding cleanup.

Format layout and historical behavior were cross-checked against Apple II File Type Note $e0/8000 as documented by CiderPress II; Squeeze uses the repository's existing managed implementation.

@Hawkynt
Hawkynt force-pushed the feat/apple2-binaryii-archive branch 3 times, most recently from 0f467ef to 0e60a71 Compare August 30, 2026 01:13
Binary II wraps each file in a 128-byte header carrying the ProDOS name, file
and auxiliary type, dates and length, with the payload padded to the next
block. Squeezed members are unpacked through the existing codec.

The two projects that needed a reference to it got a Directory.Build.props
each holding nothing but that reference. A Directory.Build.props does not
inherit the one above it unless it says so, so both projects lost every
repository-wide property, starting with TargetFramework. The reference goes
in the project files, where their other formats are listed.
@Hawkynt
Hawkynt force-pushed the feat/apple2-binaryii-archive branch from 0e60a71 to dc9281f Compare August 30, 2026 01:25
@Hawkynt
Hawkynt merged commit b0b5ff9 into main Aug 30, 2026
3 checks passed
@Hawkynt
Hawkynt deleted the feat/apple2-binaryii-archive branch August 30, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant